home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 March / Ahoy_Magazine_86-03_1986_Double_L.d64 / programmer's aid (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  46 lines

  1. 60000 print"[147]"tab(11)" programmer's aid [146]"
  2. 60002 print"run60040":print"   this provides a screen listing"
  3. 60004 print" showing the line numbers of the"
  4. 60006 print" program and their memory locations."
  5. 60008 print"run60060":print"   this automatically deletes all"
  6. 60010 print" lines in the program which begin with"
  7. 60012 print" rem or a colon."
  8. 60014 print"run60070":print"   this deletes all lines between two "
  9. 60016 print" line numbers (inclusive), which you"
  10. 60018 print" will be asked to enter.":print
  11. 60020 print"   subroutines may be activated by"
  12. 60022 print" placing the cursor on the above lines"
  13. 60024 print" and hitting return.  to erase the"
  14. 60026 print" entire subroutine, use the delete line"
  15. 60028 print" with[146] 59999 as low line #,[146] 60076 as"
  16. 60030 print" high.  when the program stops enter"
  17. 60032 print" 'run60100' and hit return.";:end
  18. 60040 dimlx(500),nx(500):n=1:nx(n)=2049:print"[147]reading program....."
  19. 60042 nx(n+1)=peek(nx(n))+256*(peek(nx(n)+1))
  20. 60044 lx(n)=peek(nx(n)+2)+256*(peek(nx(n)+3))
  21. 60046 ifnx(n+1)=0then60050
  22. 60048 n=n+1:goto60042
  23. 60050 gosub60058:fori=1ton-1:printlx(i);tab(9);nx(i)
  24. 60052 ifi/18=int(i/18)thengosub60056
  25. 60054 nexti:end
  26. 60056 print"any key to continue";:poke198,0:wait198,1:getz$
  27. 60058 print"[147]line #   mem loc":print"[163][163][163][163][163][163]   [163][163][163][163][163][163][163]":return
  28. 60060 print"[147]reading program...":poke251,(peek(43)):poke252,(peek(44))
  29. 60062 v=256:pl=peek(251)+v*(peek(252)):l=peek(pl):h=peek(pl+1):ifpl=0thenend
  30. 60064 x=(peek(pl+4)):ifx<>143andx<>58thenpoke251,l:poke252,h:goto60062
  31. 60066 ln=peek(pl+2)+v*(peek(pl+3)):print"[147]";ln:print"goto60062":poke631,13
  32. 60068 poke632,13:poke633,13:poke198,3:print"";:end
  33. 60070 print"[147]delete from[146]":input"low line #";bl:print"to":input"high line #";el
  34. 60072 print"[147]reading program....."
  35. 60074 v=256:h%=bl/v:l%=bl-h%*v:poke828,l%:poke829,h%
  36. 60076 h%=el/v:l%=el-h%*v:poke830,l%:poke831,h%:poke832,peek(43):poke833,peek(44)
  37. 60086 v=256:bl=peek(828)+v*(peek(829)):el=peek(830)+v*(peek(831))
  38. 60088 pl=peek(832)+v*(peek(833))
  39. 60090 nl=peek(pl)+v*(peek(pl+1)):ln=peek(pl+2)+v*(peek(pl+3))
  40. 60092 ifln<blthenpl=nl:goto60090
  41. 60094 ifln>elorln=0thenend
  42. 60096 h%=pl/256:l%=pl-256*h%:poke832,l%:poke833,h%:print"[147]";ln
  43. 60098 print"run60086":fori=631to633:pokei,13:nexti:poke198,3:print"";:end
  44. 60100 print"[147]";:fori=60086to60102step2:printi:next:poke631,19:fori=632to640
  45. 60102 pokei,13:next:poke198,10:end
  46.